{"ast":null,"code":"import apiClient from \"../http\";\nimport { profile, deleteUser, changeProfile } from \"../routes\";\nexport default class UserService {\n  static async profile() {\n    return apiClient.get(profile());\n  }\n  static async deleteProfile() {\n    return apiClient.delete(deleteUser());\n  }\n  static async updateProfile(profileRequest) {\n    return apiClient.put(changeProfile(), profileRequest);\n  }\n}","map":{"version":3,"names":["apiClient","profile","deleteUser","changeProfile","UserService","get","deleteProfile","delete","updateProfile","profileRequest","put"],"sources":["/data/messenger.client/src/services/UserService.ts"],"sourcesContent":["import apiClient from \"../http\";\nimport {AxiosResponse} from 'axios';\nimport {profile, deleteUser, changeProfile} from \"../routes\"\nimport {UserListItem} from \"../models/response/UserListItem\";\nimport {DeleteUserResponse} from \"../models/response/Other/DeleteUserResponse\";\nimport ProfileRequest from \"../models/request/ProfileRequest\";\n\nexport default class UserService {\n    public static async profile(): Promise<AxiosResponse<UserListItem>> {\n        return apiClient.get<UserListItem>(profile());\n    }\n\n    public static async deleteProfile(): Promise<AxiosResponse<DeleteUserResponse>> {\n        return apiClient.delete<DeleteUserResponse>(deleteUser());\n    }\n\n    public static async updateProfile(profileRequest: ProfileRequest): Promise<AxiosResponse<UserListItem>> {\n        return apiClient.put<UserListItem>(changeProfile(), profileRequest);\n    }\n}"],"mappings":"AAAA,OAAOA,SAAS,MAAM,SAAS;AAE/B,SAAQC,OAAO,EAAEC,UAAU,EAAEC,aAAa,QAAO,WAAW;AAK5D,eAAe,MAAMC,WAAW,CAAC;EAC7B,aAAoBH,OAAO,GAAyC;IAChE,OAAOD,SAAS,CAACK,GAAG,CAAeJ,OAAO,EAAE,CAAC;EACjD;EAEA,aAAoBK,aAAa,GAA+C;IAC5E,OAAON,SAAS,CAACO,MAAM,CAAqBL,UAAU,EAAE,CAAC;EAC7D;EAEA,aAAoBM,aAAa,CAACC,cAA8B,EAAwC;IACpG,OAAOT,SAAS,CAACU,GAAG,CAAeP,aAAa,EAAE,EAAEM,cAAc,CAAC;EACvE;AACJ"},"metadata":{},"sourceType":"module"}